<?php
require(dirname(__FILE__)."/includes/init.php");
if(isset($_SESSION['user_name'])){
$pageNum = isset($_REQUEST['pageNum'])?$_REQUEST['pageNum']:1;
$result = showAllUpdate($pageNum);
?>
<title>更新地址</title>
<table width="800" border="0" bgcolor="#0066FF" style="font-size:12px">
  <tr bgcolor="#FFFFFF">
    <td>id</td>
    <td>preAddress</td>
    <td>nowAddress</td>
    <td>name</td>
    <td>emailId</td>
    <td>timeStamp</td>
    <td>userBrowser</td>
    <td>userIp</td>
  </tr>
<?php
    foreach($result as $value){
?>  
  <tr bgcolor="#FFFFFF">
    <td><?php echo $value['id'];?></td>
    <td><?php echo $value['preAddress'];?></td>
    <td><?php echo $value['nowAddress'];?></td>
    <td><?php echo $value['name'];?></td>
    <td><?php echo $value['emailId'];?></td>
    <td><?php echo date("Y-m-d H:i:s",$value['timeStamp']);?></td>
    <td title="<?php echo $value['userBrowser'];?>"><?php echo $value['id'];?></td>
    <td><?php echo $value['userIp'];?></td>
  </tr>
<?php
    }
?>  
  <tr bgcolor="#FFFFFF">
    <td colspan="8"><?php 
	  $totalNum = getUpdateEmailNum();
      $totalPage = ceil($totalNum[0]/$GLOBALS['pageSize']);
      for($i=1;$i<=$totalPage;$i++){
        echo "<<a href=\"checkUpdateEmail.php?pageNum=$i\">".$i."</a>>";
      }
	?></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<?php
}else{
 echo "hello";
}
?>